#include <iostream>
using std::cout;
using std::endl;

class Base{
public:
    Base(int base)
        :_base(base)
    {

    }

    Base operator+(const Base &rhs){
        return Base(rhs._base - _base);
    }

    bool operator==(int i){
        return _base == i;
    }
private:
    int _base;
};

void test(){
    int i=2;
    int j=7;

    Base x(i);
    Base y(j);
    cout<< (x+y == j-i)<<endl;
    cout<< (y+x == i-j)<<endl;
    cout<< (y+x == j-i)<<endl;
    cout<< (x+y == j+i)<<endl;

}

int main()
{


    test ();
    return 0;
}

